int pinorder[4]={0};
int pin=0;

void setup() {
  // put your setup code here, to run once:
  //setup all digitl pin as outputpin
  int i;
  for(i=22;i<=53;i++)
  {
    pinMode(i, OUTPUT);
    digitalWrite(i,LOW);
  }
  Serial.begin(9600);
}

void loop() {
   int i;
  // put your main code here, to run repeatedly:
  if(Serial.available()>0)
  {
    
    i=0;
    while(Serial.available()>0)
    {
      
      pinorder[i]=Serial.read();
      delay(10);
      
      pinorder[i]-=48;
      i=i+1;
    }
   
    
    if(i>=3)
    {
      pin=pinorder[0]*10+pinorder[1];
      
      if(pinorder[2]==0)
      {
        digitalWrite(pin,LOW);
      }
      else if(pinorder[2]==1)
      {
        digitalWrite(pin,HIGH);
      }
      /*else
      {
        print
      }*/
    }
  }
}
